package com.cqut.service.office.contact.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cqut.dao.office.ClassificationDao;
import com.cqut.entity.Contact;
import com.cqut.service.office.contact.ContactService;

@Service
public class ContactServiceImpl implements ContactService {
	private ClassificationDao classificationDao;

	public ClassificationDao getClassificationDao() {
		return classificationDao;
	}

	@Resource
	public void setClassificationDao(ClassificationDao classificationDao) {
		this.classificationDao = classificationDao;
	}

	/**
	 * 根据员工Id得到名片夹分类
	 */
	public List<Contact> getClassificationByEmployeeId(int employeeId) {
		String hql = "from Classification where employee.id=" + employeeId;
		return classificationDao.executeQuery(hql);
	}

}
